home *** CD-ROM | disk | FTP | other *** search
- Path: winternet.com!not-for-mail
- From: jdege@winternet.com (Jeff Dege)
- Newsgroups: comp.lang.ada,comp.lang.c++,comp.lang.c,comp.lang.modula3,comp.lang.modula2,comp.edu,comp.lang.eiffel
- Subject: Re: Hungarian notation
- Date: 17 Jan 1996 01:44:46 GMT
- Organization: StarNet Communications, Inc
- Message-ID: <4dhkae$an9@blackice.winternet.com>
- References: <30C40F77.53B5@swsbbs.com> <marnoldDJEvtJ.1Lx@netcom.com> <4aleun$jlk@ns.RezoNet.NET> <marnoldDJMDBG.CFz@netcom.com> <4asnkr$7b0@solutions.solon.com> <4ath75$e7i@barnacle.iol.ie> <4b4kij$svt@news.microsoft.com> <dewar.819489496@schonberg> <4bd3ga$80a@beatty.slip.netcom.com> <dewar.819643725@schonberg> <4bhe6u$adq@beatty.slip.netcom.com> <dewar.819838019@schonberg> <4bv1ce$co1@ixnews4.ix.netcom.com> <4dh0b0$10si@pulp.ucs.ualberta.ca>
- NNTP-Posting-Host: klondike.winternet.com
- X-Newsreader: TIN [UNIX 1.3 950726BETA PL0]
-
- On 16 Jan 1996 20:03:44 GMT, Darin McBride (mcbride@ee.ualberta.ca) wrote:
- :
- : Well, first, as a disclaimer, we used adt's (classes, structs, etc.) as
- : base types. But we still found use in using the 'm_lLongVar' style
- : since we had to use sprintf alot (in real-time data-gathering, sometimes
- : the overhead of strstream was prohibitive). So was that a %d, %u, %ld,
- : %lu... or %s?
-
- Generally speaking, when I use printf(), et al., with integer types
- of uncertain or unknown size, I explicitly cast. i.e.:
-
- printf("The current epoch is %ld\n", (long) time(NULL));
-
- This is, as far as I know, the only safe way to printf() a time_t,
- size_t, etc.
-
- --
- "I quite agree with you," said the Duchess; "and the moral of
- that is -- `Be what you would seem to be' -- or, if you'd like it put
- more simply -- `Never imagine yourself not to be otherwise than what it
- might appear to others that what you were or might have been was not
- otherwise than what you had been would have appeared to them to be
- otherwise.'"
- -- Lewis Carrol, "Alice in Wonderland"
-
-
-